package cn.stylefeng.guns.modular.system.model;

import com.baomidou.mybatisplus.enums.IdType;

import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author liyong
 * @since 2019-11-28
 */
@TableName("game_log")
public class GameLog extends Model<GameLog> {

    private static final long serialVersionUID = 1L;

    /**
     * 游戏记录
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 房间id 同一房间id为对手
     */
    @TableField("room_id")
    private Integer roomId;
    @TableField("user_id")
    private Integer userId;
    /**
     * 0-消消乐 1-萌宠
     */
    @TableField("game_type")
    private Integer gameType;
    /**
     * 变化积分
     */
    @TableField("change_score")
    private BigDecimal changeScore;
    /**
     * 变化金币
     */
    @TableField("change_coin")
    private Integer changeCoin;
    /**
     * 0-失败 1-胜利  2-平局
     */
    @TableField("is_win")
    private Integer isWin;
    /**
     * 状态：0 匹配，1 游戏中，2 结束
     */
    private Integer status;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getRoomId() {
        return roomId;
    }

    public void setRoomId(Integer roomId) {
        this.roomId = roomId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getGameType() {
        return gameType;
    }

    public void setGameType(Integer gameType) {
        this.gameType = gameType;
    }

    public BigDecimal getChangeScore() {
        return changeScore;
    }

    public void setChangeScore(BigDecimal changeScore) {
        this.changeScore = changeScore;
    }

    public Integer getChangeCoin() {
        return changeCoin;
    }

    public void setChangeCoin(Integer changeCoin) {
        this.changeCoin = changeCoin;
    }

    public Integer getIsWin() {
        return isWin;
    }

    public void setIsWin(Integer isWin) {
        this.isWin = isWin;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "GameLog{" +
        ", id=" + id +
        ", roomId=" + roomId +
        ", userId=" + userId +
        ", gameType=" + gameType +
        ", changeScore=" + changeScore +
        ", changeCoin=" + changeCoin +
        ", isWin=" + isWin +
        ", status=" + status +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        "}";
    }
}
